{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"Chess_Clustering.ipynb","provenance":[],"collapsed_sections":["1D5ZR7PBdCrn","hUuja20qCfLp","gwANCcFPCkcG"],"toc_visible":true,"mount_file_id":"1xiz-RC8zKmcs_R-Ll5FgHmSC2IFOR16c","authorship_tag":"ABX9TyNxXiDj6D0C4z15ryIijZ23"},"kernelspec":{"name":"python3","display_name":"Python 3"}},"cells":[{"cell_type":"markdown","metadata":{"id":"1D5ZR7PBdCrn","colab_type":"text"},"source":["##Create Chess Dataset"]},{"cell_type":"code","metadata":{"id":"EoDo6GeOeFtO","colab_type":"code","outputId":"a0a2c9bb-122c-4d21-f5fb-18f296add0eb","executionInfo":{"status":"ok","timestamp":1591007283995,"user_tz":-120,"elapsed":3296,"user":{"displayName":"Michelangiolo Mazzeschi","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14Ghg8l8QeAQA6fd1iPVc2f_F0XQpum7zRjrF4R7HRw=s64","userId":"15738155355555420240"}},"colab":{"base_uri":"https://localhost:8080/","height":419}},"source":["import pandas as pd\n","#importing dataset\n","X = pd.read_csv('/content/drive/My Drive/Colab Notebooks/Projects/20200526_Chess Openings/chess1.csv')\n","X"],"execution_count":1,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>Unnamed: 0</th>\n","      <th>0</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>0</td>\n","      <td>1. d4 Nf6 2. Nf3 g6 3. Bf4 Bg7 4. e3 O-O 5. h3...</td>\n","    </tr>\n","    <tr>\n","      <th>1</th>\n","      <td>1</td>\n","      <td>1. d4 d5 2. c4 c6 3. Nf3 Nf6 4. Nc3 a6 5. cxd5...</td>\n","    </tr>\n","    <tr>\n","      <th>2</th>\n","      <td>2</td>\n","      <td>1. e4 c5 2. Nf3 e6 3. Nc3 Nc6 4. d4 cxd4 5. Nx...</td>\n","    </tr>\n","    <tr>\n","      <th>3</th>\n","      <td>3</td>\n","      <td>1. d4 Nf6 2. c4 c5 3. e3 g6 4. Nc3 Bg7 5. Nf3 ...</td>\n","    </tr>\n","    <tr>\n","      <th>4</th>\n","      <td>4</td>\n","      <td>1. e4 c5 2. Nf3 d6 3. Nc3 Nf6 4. e5 dxe5 5. Nx...</td>\n","    </tr>\n","    <tr>\n","      <th>...</th>\n","      <td>...</td>\n","      <td>...</td>\n","    </tr>\n","    <tr>\n","      <th>7670</th>\n","      <td>7679</td>\n","      <td>1. e4 e5 2. Nf3 Nc6 3. Bc4 Bc5 4. c3 Nf6 5. d4...</td>\n","    </tr>\n","    <tr>\n","      <th>7671</th>\n","      <td>7680</td>\n","      <td>1. d4 d5 2. Nf3 Nf6 3. c4 dxc4 4. e3 c5 5. Bxc...</td>\n","    </tr>\n","    <tr>\n","      <th>7672</th>\n","      <td>7681</td>\n","      <td>1. e4 e5 2. Nf3 Nc6 3. Bc4 Bc5 4. d3 Nf6 5. O-...</td>\n","    </tr>\n","    <tr>\n","      <th>7673</th>\n","      <td>7682</td>\n","      <td>1. d4 d5 2. c4 dxc4 3. e3 Nf6 4. Bxc4 c5 5. Nf...</td>\n","    </tr>\n","    <tr>\n","      <th>7674</th>\n","      <td>7683</td>\n","      <td>1. e4 c5 2. Nf3 Nc6 3. Bb5 g6 4. Bxc6 dxc6 5. ...</td>\n","    </tr>\n","  </tbody>\n","</table>\n","<p>7675 rows × 2 columns</p>\n","</div>"],"text/plain":["      Unnamed: 0                                                  0\n","0              0  1. d4 Nf6 2. Nf3 g6 3. Bf4 Bg7 4. e3 O-O 5. h3...\n","1              1  1. d4 d5 2. c4 c6 3. Nf3 Nf6 4. Nc3 a6 5. cxd5...\n","2              2  1. e4 c5 2. Nf3 e6 3. Nc3 Nc6 4. d4 cxd4 5. Nx...\n","3              3  1. d4 Nf6 2. c4 c5 3. e3 g6 4. Nc3 Bg7 5. Nf3 ...\n","4              4  1. e4 c5 2. Nf3 d6 3. Nc3 Nf6 4. e5 dxe5 5. Nx...\n","...          ...                                                ...\n","7670        7679  1. e4 e5 2. Nf3 Nc6 3. Bc4 Bc5 4. c3 Nf6 5. d4...\n","7671        7680  1. d4 d5 2. Nf3 Nf6 3. c4 dxc4 4. e3 c5 5. Bxc...\n","7672        7681  1. e4 e5 2. Nf3 Nc6 3. Bc4 Bc5 4. d3 Nf6 5. O-...\n","7673        7682  1. d4 d5 2. c4 dxc4 3. e3 Nf6 4. Bxc4 c5 5. Nf...\n","7674        7683  1. e4 c5 2. Nf3 Nc6 3. Bb5 g6 4. Bxc6 dxc6 5. ...\n","\n","[7675 rows x 2 columns]"]},"metadata":{"tags":[]},"execution_count":1}]},{"cell_type":"code","metadata":{"id":"73hXTEgdmf3_","colab_type":"code","outputId":"c69cebdf-4d02-4553-d5d8-0867cb71beec","executionInfo":{"status":"ok","timestamp":1591007771123,"user_tz":-120,"elapsed":729,"user":{"displayName":"Michelangiolo Mazzeschi","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14Ghg8l8QeAQA6fd1iPVc2f_F0XQpum7zRjrF4R7HRw=s64","userId":"15738155355555420240"}},"colab":{"base_uri":"https://localhost:8080/","height":34}},"source":["X.shape[0]"],"execution_count":2,"outputs":[{"output_type":"execute_result","data":{"text/plain":["7675"]},"metadata":{"tags":[]},"execution_count":2}]},{"cell_type":"code","metadata":{"id":"z7l8di6Ek1sA","colab_type":"code","outputId":"752b1d7e-5cf2-4383-f3fc-d816322a6f85","executionInfo":{"status":"ok","timestamp":1591007923153,"user_tz":-120,"elapsed":986,"user":{"displayName":"Michelangiolo Mazzeschi","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14Ghg8l8QeAQA6fd1iPVc2f_F0XQpum7zRjrF4R7HRw=s64","userId":"15738155355555420240"}},"colab":{"base_uri":"https://localhost:8080/","height":425}},"source":["n_moves = X.shape[0]\n","\n","#break every game in individual moves\n","moves = [[] for x in range(n_moves-1)]\n","for _ in range(n_moves-1):\n","  game = X['0'][_].split(\".\")\n","  #r è una list con tutte le mosse di una partita\n","  game.remove('1')\n","  for move in game:\n","    try:\n","      player_move = move.split(\" \")\n","      #print(player_move)\n","      moves[_].append(player_move[1]) #add white move\n","      moves[_].append(player_move[2]) #add black move\n","    except:\n","      print(_)"],"execution_count":8,"outputs":[{"output_type":"stream","text":["3302\n","3302\n","3303\n","3303\n","3304\n","3304\n","3305\n","3305\n","3306\n","3306\n","3307\n","3307\n","3308\n","3308\n","3309\n","3309\n","3310\n","3310\n","5280\n","5280\n","5284\n","5284\n","5285\n","5285\n"],"name":"stdout"}]},{"cell_type":"code","metadata":{"id":"UJ9ysC-k4_qb","colab_type":"code","outputId":"fe5c2054-8dbc-4410-9cac-f7865431083f","executionInfo":{"status":"ok","timestamp":1590969175691,"user_tz":-120,"elapsed":1331,"user":{"displayName":"Michelangiolo Mazzeschi","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14Ghg8l8QeAQA6fd1iPVc2f_F0XQpum7zRjrF4R7HRw=s64","userId":"15738155355555420240"}},"colab":{"base_uri":"https://localhost:8080/","height":490}},"source":["moves = pd.DataFrame(moves)\n","moves"],"execution_count":5,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>0</th>\n","      <th>1</th>\n","      <th>2</th>\n","      <th>3</th>\n","      <th>4</th>\n","      <th>5</th>\n","      <th>6</th>\n","      <th>7</th>\n","      <th>8</th>\n","      <th>9</th>\n","      <th>10</th>\n","      <th>11</th>\n","      <th>12</th>\n","      <th>13</th>\n","      <th>14</th>\n","      <th>15</th>\n","      <th>16</th>\n","      <th>17</th>\n","      <th>18</th>\n","      <th>19</th>\n","      <th>20</th>\n","      <th>21</th>\n","      <th>22</th>\n","      <th>23</th>\n","      <th>24</th>\n","      <th>25</th>\n","      <th>26</th>\n","      <th>27</th>\n","      <th>28</th>\n","      <th>29</th>\n","      <th>30</th>\n","      <th>31</th>\n","      <th>32</th>\n","      <th>33</th>\n","      <th>34</th>\n","      <th>35</th>\n","      <th>36</th>\n","      <th>37</th>\n","      <th>38</th>\n","      <th>39</th>\n","      <th>...</th>\n","      <th>230</th>\n","      <th>231</th>\n","      <th>232</th>\n","      <th>233</th>\n","      <th>234</th>\n","      <th>235</th>\n","      <th>236</th>\n","      <th>237</th>\n","      <th>238</th>\n","      <th>239</th>\n","      <th>240</th>\n","      <th>241</th>\n","      <th>242</th>\n","      <th>243</th>\n","      <th>244</th>\n","      <th>245</th>\n","      <th>246</th>\n","      <th>247</th>\n","      <th>248</th>\n","      <th>249</th>\n","      <th>250</th>\n","      <th>251</th>\n","      <th>252</th>\n","      <th>253</th>\n","      <th>254</th>\n","      <th>255</th>\n","      <th>256</th>\n","      <th>257</th>\n","      <th>258</th>\n","      <th>259</th>\n","      <th>260</th>\n","      <th>261</th>\n","      <th>262</th>\n","      <th>263</th>\n","      <th>264</th>\n","      <th>265</th>\n","      <th>266</th>\n","      <th>267</th>\n","      <th>268</th>\n","      <th>269</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>d4</td>\n","      <td>Nf6</td>\n","      <td>Nf3</td>\n","      <td>g6</td>\n","      <td>Bf4</td>\n","      <td>Bg7</td>\n","      <td>e3</td>\n","      <td>O-O</td>\n","      <td>h3</td>\n","      <td>c5</td>\n","      <td>c3</td>\n","      <td>b6</td>\n","      <td>Bh2</td>\n","      <td>Bb7</td>\n","      <td>Be2</td>\n","      <td>d6</td>\n","      <td>O-O</td>\n","      <td>Nbd7</td>\n","      <td>Nbd2</td>\n","      <td>a6</td>\n","      <td>a4</td>\n","      <td>Qc7</td>\n","      <td>Ne1</td>\n","      <td>Bc6</td>\n","      <td>Bf3</td>\n","      <td>b5</td>\n","      <td>Bxc6</td>\n","      <td>Qxc6</td>\n","      <td>Nd3</td>\n","      <td>Nb6</td>\n","      <td>a5</td>\n","      <td>Nc4</td>\n","      <td>dxc5</td>\n","      <td>Nxd2</td>\n","      <td>Qxd2</td>\n","      <td>dxc5</td>\n","      <td>Ne5</td>\n","      <td>Qe6</td>\n","      <td>Rfd1</td>\n","      <td>Rfc8</td>\n","      <td>...</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","    </tr>\n","    <tr>\n","      <th>1</th>\n","      <td>d4</td>\n","      <td>d5</td>\n","      <td>c4</td>\n","      <td>c6</td>\n","      <td>Nf3</td>\n","      <td>Nf6</td>\n","      <td>Nc3</td>\n","      <td>a6</td>\n","      <td>cxd5</td>\n","      <td>cxd5</td>\n","      <td>Bf4</td>\n","      <td>Nc6</td>\n","      <td>e3</td>\n","      <td>Bf5</td>\n","      <td>Rc1</td>\n","      <td>e6</td>\n","      <td>Qb3</td>\n","      <td>Na5</td>\n","      <td>Qa4+</td>\n","      <td>Nc6</td>\n","      <td>Ne5</td>\n","      <td>Rc8</td>\n","      <td>Nxc6</td>\n","      <td>Qd7</td>\n","      <td>Nb5</td>\n","      <td>Rxc6</td>\n","      <td>Rxc6</td>\n","      <td>Qxc6</td>\n","      <td>Nd6+</td>\n","      <td>Bxd6</td>\n","      <td>Qxc6+</td>\n","      <td>bxc6</td>\n","      <td>Bxd6</td>\n","      <td>Kd7</td>\n","      <td>Be5</td>\n","      <td>Ne8</td>\n","      <td>Bxa6</td>\n","      <td>Nd6</td>\n","      <td>Be2</td>\n","      <td>Ra8</td>\n","      <td>...</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","    </tr>\n","    <tr>\n","      <th>2</th>\n","      <td>e4</td>\n","      <td>c5</td>\n","      <td>Nf3</td>\n","      <td>e6</td>\n","      <td>Nc3</td>\n","      <td>Nc6</td>\n","      <td>d4</td>\n","      <td>cxd4</td>\n","      <td>Nxd4</td>\n","      <td>a6</td>\n","      <td>g3</td>\n","      <td>Nxd4</td>\n","      <td>Qxd4</td>\n","      <td>b5</td>\n","      <td>Bg2</td>\n","      <td>Bb7</td>\n","      <td>O-O</td>\n","      <td>Ne7</td>\n","      <td>Qd3</td>\n","      <td>Nc6</td>\n","      <td>f4</td>\n","      <td>Bc5+</td>\n","      <td>Kh1</td>\n","      <td>O-O</td>\n","      <td>Rd1</td>\n","      <td>Qb6</td>\n","      <td>e5</td>\n","      <td>d6</td>\n","      <td>Ne4</td>\n","      <td>dxe5</td>\n","      <td>Nxc5</td>\n","      <td>Qxc5</td>\n","      <td>Be3</td>\n","      <td>Qb4</td>\n","      <td>Qd7</td>\n","      <td>Na5</td>\n","      <td>Bxb7</td>\n","      <td>Nxb7</td>\n","      <td>Qxb7</td>\n","      <td>Qxb2</td>\n","      <td>...</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","    </tr>\n","    <tr>\n","      <th>3</th>\n","      <td>d4</td>\n","      <td>Nf6</td>\n","      <td>c4</td>\n","      <td>c5</td>\n","      <td>e3</td>\n","      <td>g6</td>\n","      <td>Nc3</td>\n","      <td>Bg7</td>\n","      <td>Nf3</td>\n","      <td>O-O</td>\n","      <td>Be2</td>\n","      <td>d6</td>\n","      <td>O-O</td>\n","      <td>Nc6</td>\n","      <td>b3</td>\n","      <td>Bg4</td>\n","      <td>Bb2</td>\n","      <td>Nd7</td>\n","      <td>d5</td>\n","      <td>Nce5</td>\n","      <td>Nd2</td>\n","      <td>Bxe2</td>\n","      <td>Qxe2</td>\n","      <td>f5</td>\n","      <td>f4</td>\n","      <td>Nf7</td>\n","      <td>e4</td>\n","      <td>Bd4+</td>\n","      <td>Kh1</td>\n","      <td>Nf6</td>\n","      <td>exf5</td>\n","      <td>gxf5</td>\n","      <td>Nf3</td>\n","      <td>Bxc3</td>\n","      <td>Bxc3</td>\n","      <td>Ne4</td>\n","      <td>Bb2</td>\n","      <td>Qd7</td>\n","      <td>g4</td>\n","      <td>h6</td>\n","      <td>...</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","    </tr>\n","    <tr>\n","      <th>4</th>\n","      <td>e4</td>\n","      <td>c5</td>\n","      <td>Nf3</td>\n","      <td>d6</td>\n","      <td>Nc3</td>\n","      <td>Nf6</td>\n","      <td>e5</td>\n","      <td>dxe5</td>\n","      <td>Nxe5</td>\n","      <td>a6</td>\n","      <td>a4</td>\n","      <td>Qc7</td>\n","      <td>Nc4</td>\n","      <td>Nc6</td>\n","      <td>g3</td>\n","      <td>Be6</td>\n","      <td>Ne3</td>\n","      <td>h5</td>\n","      <td>h3</td>\n","      <td>Rd8</td>\n","      <td>Bg2</td>\n","      <td>g6</td>\n","      <td>Ne2</td>\n","      <td>Bh6</td>\n","      <td>d3</td>\n","      <td>Nd4</td>\n","      <td>O-O</td>\n","      <td>c4</td>\n","      <td>Nxd4</td>\n","      <td>Rxd4</td>\n","      <td>Nxc4</td>\n","      <td>Bxc4</td>\n","      <td>Bxh6</td>\n","      <td>Rxh6</td>\n","      <td>Qc1</td>\n","      <td>Rh8</td>\n","      <td>dxc4</td>\n","      <td>Rxc4</td>\n","      <td>c3</td>\n","      <td>Qc5</td>\n","      <td>...</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","    </tr>\n","    <tr>\n","      <th>...</th>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","    </tr>\n","    <tr>\n","      <th>7669</th>\n","      <td>Nf3</td>\n","      <td>Nf6</td>\n","      <td>c4</td>\n","      <td>b6</td>\n","      <td>g3</td>\n","      <td>Bb7</td>\n","      <td>d4</td>\n","      <td>g6</td>\n","      <td>Nc3</td>\n","      <td>Bg7</td>\n","      <td>Bg2</td>\n","      <td>O-O</td>\n","      <td>Qc2</td>\n","      <td>c5</td>\n","      <td>d5</td>\n","      <td>e6</td>\n","      <td>O-O</td>\n","      <td>exd5</td>\n","      <td>Nd2</td>\n","      <td>Nc6</td>\n","      <td>cxd5</td>\n","      <td>Nd4</td>\n","      <td>Qd1</td>\n","      <td>Re8</td>\n","      <td>Re1</td>\n","      <td>d6</td>\n","      <td>e3</td>\n","      <td>Nf5</td>\n","      <td>a4</td>\n","      <td>Ba6</td>\n","      <td>Nb5</td>\n","      <td>Bxb5</td>\n","      <td>axb5</td>\n","      <td>Qd7</td>\n","      <td>Qa4</td>\n","      <td>Nd4</td>\n","      <td>Nc4</td>\n","      <td>Qxb5</td>\n","      <td>Nxd6</td>\n","      <td>Qxa4</td>\n","      <td>...</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","    </tr>\n","    <tr>\n","      <th>7670</th>\n","      <td>e4</td>\n","      <td>e5</td>\n","      <td>Nf3</td>\n","      <td>Nc6</td>\n","      <td>Bc4</td>\n","      <td>Bc5</td>\n","      <td>c3</td>\n","      <td>Nf6</td>\n","      <td>d4</td>\n","      <td>exd4</td>\n","      <td>e5</td>\n","      <td>d5</td>\n","      <td>Bb5</td>\n","      <td>Ne4</td>\n","      <td>cxd4</td>\n","      <td>Bb6</td>\n","      <td>Nc3</td>\n","      <td>Bg4</td>\n","      <td>Be3</td>\n","      <td>O-O</td>\n","      <td>h3</td>\n","      <td>Bh5</td>\n","      <td>Qc2</td>\n","      <td>Bxf3</td>\n","      <td>gxf3</td>\n","      <td>Ng5</td>\n","      <td>O-O-O</td>\n","      <td>Ne6</td>\n","      <td>Bxc6</td>\n","      <td>bxc6</td>\n","      <td>f4</td>\n","      <td>Qh4</td>\n","      <td>Qf5</td>\n","      <td>g6</td>\n","      <td>Qg4</td>\n","      <td>Qxg4</td>\n","      <td>hxg4</td>\n","      <td>f5</td>\n","      <td>exf6</td>\n","      <td>Rxf6</td>\n","      <td>...</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","    </tr>\n","    <tr>\n","      <th>7671</th>\n","      <td>d4</td>\n","      <td>d5</td>\n","      <td>Nf3</td>\n","      <td>Nf6</td>\n","      <td>c4</td>\n","      <td>dxc4</td>\n","      <td>e3</td>\n","      <td>c5</td>\n","      <td>Bxc4</td>\n","      <td>cxd4</td>\n","      <td>O-O</td>\n","      <td>e6</td>\n","      <td>exd4</td>\n","      <td>Be7</td>\n","      <td>Nc3</td>\n","      <td>O-O</td>\n","      <td>a3</td>\n","      <td>a6</td>\n","      <td>Qd3</td>\n","      <td>b5</td>\n","      <td>Bb3</td>\n","      <td>Bb7</td>\n","      <td>Bc2</td>\n","      <td>Nc6</td>\n","      <td>Re1</td>\n","      <td>b4</td>\n","      <td>Bg5</td>\n","      <td>g6</td>\n","      <td>Na4</td>\n","      <td>bxa3</td>\n","      <td>bxa3</td>\n","      <td>Nd5</td>\n","      <td>Bh6</td>\n","      <td>Re8</td>\n","      <td>Nc5</td>\n","      <td>Bxc5</td>\n","      <td>dxc5</td>\n","      <td>Qf6</td>\n","      <td>Rab1</td>\n","      <td>Rab8</td>\n","      <td>...</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","    </tr>\n","    <tr>\n","      <th>7672</th>\n","      <td>e4</td>\n","      <td>e5</td>\n","      <td>Nf3</td>\n","      <td>Nc6</td>\n","      <td>Bc4</td>\n","      <td>Bc5</td>\n","      <td>d3</td>\n","      <td>Nf6</td>\n","      <td>O-O</td>\n","      <td>h6</td>\n","      <td>a4</td>\n","      <td>d6</td>\n","      <td>c3</td>\n","      <td>a5</td>\n","      <td>Re1</td>\n","      <td>O-O</td>\n","      <td>h3</td>\n","      <td>Be6</td>\n","      <td>Nbd2</td>\n","      <td>Ba7</td>\n","      <td>b3</td>\n","      <td>Ne7</td>\n","      <td>Nf1</td>\n","      <td>c6</td>\n","      <td>Bxe6</td>\n","      <td>fxe6</td>\n","      <td>d4</td>\n","      <td>exd4</td>\n","      <td>cxd4</td>\n","      <td>Ng6</td>\n","      <td>Ng3</td>\n","      <td>Qd7</td>\n","      <td>Be3</td>\n","      <td>Rf7</td>\n","      <td>Qd2</td>\n","      <td>Bb6</td>\n","      <td>Rad1</td>\n","      <td>d5</td>\n","      <td>e5</td>\n","      <td>Ne4</td>\n","      <td>...</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","    </tr>\n","    <tr>\n","      <th>7673</th>\n","      <td>d4</td>\n","      <td>d5</td>\n","      <td>c4</td>\n","      <td>dxc4</td>\n","      <td>e3</td>\n","      <td>Nf6</td>\n","      <td>Bxc4</td>\n","      <td>c5</td>\n","      <td>Nf3</td>\n","      <td>cxd4</td>\n","      <td>exd4</td>\n","      <td>g6</td>\n","      <td>Qb3</td>\n","      <td>e6</td>\n","      <td>Bg5</td>\n","      <td>Bg7</td>\n","      <td>O-O</td>\n","      <td>O-O</td>\n","      <td>Nc3</td>\n","      <td>Nc6</td>\n","      <td>Rad1</td>\n","      <td>Na5</td>\n","      <td>Qb4</td>\n","      <td>Nxc4</td>\n","      <td>Qxc4</td>\n","      <td>h6</td>\n","      <td>Bh4</td>\n","      <td>Bd7</td>\n","      <td>d5</td>\n","      <td>Qc8</td>\n","      <td>Qxc8</td>\n","      <td>Raxc8</td>\n","      <td>Ne5</td>\n","      <td>g5</td>\n","      <td>Nxd7</td>\n","      <td>Nxd7</td>\n","      <td>dxe6</td>\n","      <td>fxe6</td>\n","      <td>Rxd7</td>\n","      <td>gxh4</td>\n","      <td>...</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","      <td>None</td>\n","    </tr>\n","  </tbody>\n","</table>\n","<p>7674 rows × 270 columns</p>\n","</div>"],"text/plain":["      0    1    2     3    4     5    ...   264   265   266   267   268   269\n","0      d4  Nf6  Nf3    g6  Bf4   Bg7  ...  None  None  None  None  None  None\n","1      d4   d5   c4    c6  Nf3   Nf6  ...  None  None  None  None  None  None\n","2      e4   c5  Nf3    e6  Nc3   Nc6  ...  None  None  None  None  None  None\n","3      d4  Nf6   c4    c5   e3    g6  ...  None  None  None  None  None  None\n","4      e4   c5  Nf3    d6  Nc3   Nf6  ...  None  None  None  None  None  None\n","...   ...  ...  ...   ...  ...   ...  ...   ...   ...   ...   ...   ...   ...\n","7669  Nf3  Nf6   c4    b6   g3   Bb7  ...  None  None  None  None  None  None\n","7670   e4   e5  Nf3   Nc6  Bc4   Bc5  ...  None  None  None  None  None  None\n","7671   d4   d5  Nf3   Nf6   c4  dxc4  ...  None  None  None  None  None  None\n","7672   e4   e5  Nf3   Nc6  Bc4   Bc5  ...  None  None  None  None  None  None\n","7673   d4   d5   c4  dxc4   e3   Nf6  ...  None  None  None  None  None  None\n","\n","[7674 rows x 270 columns]"]},"metadata":{"tags":[]},"execution_count":5}]},{"cell_type":"code","metadata":{"id":"F5KYYXxJ7FlM","colab_type":"code","outputId":"a515f502-006d-4107-92cb-2a77dd5ac09f","executionInfo":{"status":"ok","timestamp":1590969540433,"user_tz":-120,"elapsed":664,"user":{"displayName":"Michelangiolo Mazzeschi","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14Ghg8l8QeAQA6fd1iPVc2f_F0XQpum7zRjrF4R7HRw=s64","userId":"15738155355555420240"}},"colab":{"base_uri":"https://localhost:8080/","height":419}},"source":["#only conserve opening columns\n","list1 = [x for x in range(0, 10)]\n","list1\n","\n","moves.columns\n","tot = moves[list1]\n","tot"],"execution_count":10,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>0</th>\n","      <th>1</th>\n","      <th>2</th>\n","      <th>3</th>\n","      <th>4</th>\n","      <th>5</th>\n","      <th>6</th>\n","      <th>7</th>\n","      <th>8</th>\n","      <th>9</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>d4</td>\n","      <td>Nf6</td>\n","      <td>Nf3</td>\n","      <td>g6</td>\n","      <td>Bf4</td>\n","      <td>Bg7</td>\n","      <td>e3</td>\n","      <td>O-O</td>\n","      <td>h3</td>\n","      <td>c5</td>\n","    </tr>\n","    <tr>\n","      <th>1</th>\n","      <td>d4</td>\n","      <td>d5</td>\n","      <td>c4</td>\n","      <td>c6</td>\n","      <td>Nf3</td>\n","      <td>Nf6</td>\n","      <td>Nc3</td>\n","      <td>a6</td>\n","      <td>cxd5</td>\n","      <td>cxd5</td>\n","    </tr>\n","    <tr>\n","      <th>2</th>\n","      <td>e4</td>\n","      <td>c5</td>\n","      <td>Nf3</td>\n","      <td>e6</td>\n","      <td>Nc3</td>\n","      <td>Nc6</td>\n","      <td>d4</td>\n","      <td>cxd4</td>\n","      <td>Nxd4</td>\n","      <td>a6</td>\n","    </tr>\n","    <tr>\n","      <th>3</th>\n","      <td>d4</td>\n","      <td>Nf6</td>\n","      <td>c4</td>\n","      <td>c5</td>\n","      <td>e3</td>\n","      <td>g6</td>\n","      <td>Nc3</td>\n","      <td>Bg7</td>\n","      <td>Nf3</td>\n","      <td>O-O</td>\n","    </tr>\n","    <tr>\n","      <th>4</th>\n","      <td>e4</td>\n","      <td>c5</td>\n","      <td>Nf3</td>\n","      <td>d6</td>\n","      <td>Nc3</td>\n","      <td>Nf6</td>\n","      <td>e5</td>\n","      <td>dxe5</td>\n","      <td>Nxe5</td>\n","      <td>a6</td>\n","    </tr>\n","    <tr>\n","      <th>...</th>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","    </tr>\n","    <tr>\n","      <th>7669</th>\n","      <td>Nf3</td>\n","      <td>Nf6</td>\n","      <td>c4</td>\n","      <td>b6</td>\n","      <td>g3</td>\n","      <td>Bb7</td>\n","      <td>d4</td>\n","      <td>g6</td>\n","      <td>Nc3</td>\n","      <td>Bg7</td>\n","    </tr>\n","    <tr>\n","      <th>7670</th>\n","      <td>e4</td>\n","      <td>e5</td>\n","      <td>Nf3</td>\n","      <td>Nc6</td>\n","      <td>Bc4</td>\n","      <td>Bc5</td>\n","      <td>c3</td>\n","      <td>Nf6</td>\n","      <td>d4</td>\n","      <td>exd4</td>\n","    </tr>\n","    <tr>\n","      <th>7671</th>\n","      <td>d4</td>\n","      <td>d5</td>\n","      <td>Nf3</td>\n","      <td>Nf6</td>\n","      <td>c4</td>\n","      <td>dxc4</td>\n","      <td>e3</td>\n","      <td>c5</td>\n","      <td>Bxc4</td>\n","      <td>cxd4</td>\n","    </tr>\n","    <tr>\n","      <th>7672</th>\n","      <td>e4</td>\n","      <td>e5</td>\n","      <td>Nf3</td>\n","      <td>Nc6</td>\n","      <td>Bc4</td>\n","      <td>Bc5</td>\n","      <td>d3</td>\n","      <td>Nf6</td>\n","      <td>O-O</td>\n","      <td>h6</td>\n","    </tr>\n","    <tr>\n","      <th>7673</th>\n","      <td>d4</td>\n","      <td>d5</td>\n","      <td>c4</td>\n","      <td>dxc4</td>\n","      <td>e3</td>\n","      <td>Nf6</td>\n","      <td>Bxc4</td>\n","      <td>c5</td>\n","      <td>Nf3</td>\n","      <td>cxd4</td>\n","    </tr>\n","  </tbody>\n","</table>\n","<p>7674 rows × 10 columns</p>\n","</div>"],"text/plain":["        0    1    2     3    4     5     6     7     8     9\n","0      d4  Nf6  Nf3    g6  Bf4   Bg7    e3   O-O    h3    c5\n","1      d4   d5   c4    c6  Nf3   Nf6   Nc3    a6  cxd5  cxd5\n","2      e4   c5  Nf3    e6  Nc3   Nc6    d4  cxd4  Nxd4    a6\n","3      d4  Nf6   c4    c5   e3    g6   Nc3   Bg7   Nf3   O-O\n","4      e4   c5  Nf3    d6  Nc3   Nf6    e5  dxe5  Nxe5    a6\n","...   ...  ...  ...   ...  ...   ...   ...   ...   ...   ...\n","7669  Nf3  Nf6   c4    b6   g3   Bb7    d4    g6   Nc3   Bg7\n","7670   e4   e5  Nf3   Nc6  Bc4   Bc5    c3   Nf6    d4  exd4\n","7671   d4   d5  Nf3   Nf6   c4  dxc4    e3    c5  Bxc4  cxd4\n","7672   e4   e5  Nf3   Nc6  Bc4   Bc5    d3   Nf6   O-O    h6\n","7673   d4   d5   c4  dxc4   e3   Nf6  Bxc4    c5   Nf3  cxd4\n","\n","[7674 rows x 10 columns]"]},"metadata":{"tags":[]},"execution_count":10}]},{"cell_type":"markdown","metadata":{"id":"hUuja20qCfLp","colab_type":"text"},"source":["##Groupby Name"]},{"cell_type":"code","metadata":{"id":"A_JOjR1uY0Y8","colab_type":"code","outputId":"b253d23f-0f73-4ba5-9ad6-8c72bc0acfd0","executionInfo":{"status":"ok","timestamp":1590511740724,"user_tz":-120,"elapsed":783,"user":{"displayName":"Michelangiolo Mazzeschi","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14Ghg8l8QeAQA6fd1iPVc2f_F0XQpum7zRjrF4R7HRw=s64","userId":"15738155355555420240"}},"colab":{"base_uri":"https://localhost:8080/","height":1000}},"source":["final = tot.groupby([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], group_keys=True, squeeze=True, sort=True).count()\n","final = pd.DataFrame(final)\n","final"],"execution_count":0,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","    </tr>\n","    <tr>\n","      <th>0</th>\n","      <th>1</th>\n","      <th>2</th>\n","      <th>3</th>\n","      <th>4</th>\n","      <th>5</th>\n","      <th>6</th>\n","      <th>7</th>\n","      <th>8</th>\n","      <th>9</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th rowspan=\"50\" valign=\"top\">Nc3</th>\n","      <th rowspan=\"17\" valign=\"top\">d5</th>\n","      <th rowspan=\"4\" valign=\"top\">Nf3</th>\n","      <th rowspan=\"3\" valign=\"top\">d4</th>\n","      <th rowspan=\"3\" valign=\"top\">Ne4</th>\n","      <th>c5</th>\n","      <th>Ng3</th>\n","      <th>e6</th>\n","      <th>e4</th>\n","      <th>Nf6</th>\n","    </tr>\n","    <tr>\n","      <th>e5</th>\n","      <th>Ng3</th>\n","      <th>Nf6</th>\n","      <th>e4</th>\n","      <th>Nc6</th>\n","    </tr>\n","    <tr>\n","      <th>h5</th>\n","      <th>h4</th>\n","      <th>e5</th>\n","      <th>Neg5</th>\n","      <th>f6</th>\n","    </tr>\n","    <tr>\n","      <th>e6</th>\n","      <th>d4</th>\n","      <th>Nf6</th>\n","      <th>Bg5</th>\n","      <th>Be7</th>\n","      <th>Bxf6</th>\n","      <th>Bxf6</th>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"3\" valign=\"top\">d4</th>\n","      <th rowspan=\"2\" valign=\"top\">Nf6</th>\n","      <th rowspan=\"2\" valign=\"top\">Bf4</th>\n","      <th>c5</th>\n","      <th>e3</th>\n","      <th>cxd4</th>\n","      <th>exd4</th>\n","      <th>a6</th>\n","    </tr>\n","    <tr>\n","      <th>e6</th>\n","      <th>a3</th>\n","      <th>Bd6</th>\n","      <th>Bg5</th>\n","      <th>c5</th>\n","    </tr>\n","    <tr>\n","      <th>c5</th>\n","      <th>e4</th>\n","      <th>e5</th>\n","      <th>Nxd5</th>\n","      <th>cxd4</th>\n","      <th>Nf3</th>\n","      <th>Nc6</th>\n","    </tr>\n","    <tr>\n","      <th>e3</th>\n","      <th>Nc6</th>\n","      <th>d4</th>\n","      <th>Bf5</th>\n","      <th>Bb5</th>\n","      <th>e6</th>\n","      <th>Nf3</th>\n","      <th>Bd6</th>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"9\" valign=\"top\">e4</th>\n","      <th>Nf6</th>\n","      <th>e5</th>\n","      <th>Nfd7</th>\n","      <th>Nxd5</th>\n","      <th>Nxe5</th>\n","      <th>Ne3</th>\n","      <th>c5</th>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"4\" valign=\"top\">d4</th>\n","      <th rowspan=\"3\" valign=\"top\">Nce2</th>\n","      <th rowspan=\"3\" valign=\"top\">e5</th>\n","      <th rowspan=\"3\" valign=\"top\">Ng3</th>\n","      <th>Be6</th>\n","      <th>Nf3</th>\n","      <th>Nd7</th>\n","    </tr>\n","    <tr>\n","      <th>Nc6</th>\n","      <th>Nf3</th>\n","      <th>Nf6</th>\n","    </tr>\n","    <tr>\n","      <th>h5</th>\n","      <th>Nxh5</th>\n","      <th>c5</th>\n","    </tr>\n","    <tr>\n","      <th>Nd5</th>\n","      <th>e6</th>\n","      <th>Nf4</th>\n","      <th>g5</th>\n","      <th>Nd3</th>\n","      <th>Ke7</th>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"3\" valign=\"top\">dxe4</th>\n","      <th rowspan=\"2\" valign=\"top\">Nxe4</th>\n","      <th rowspan=\"2\" valign=\"top\">Nf6</th>\n","      <th rowspan=\"2\" valign=\"top\">Nxf6+</th>\n","      <th rowspan=\"2\" valign=\"top\">exf6</th>\n","      <th>Nf3</th>\n","      <th>Bd6</th>\n","    </tr>\n","    <tr>\n","      <th>d4</th>\n","      <th>Bd6</th>\n","    </tr>\n","    <tr>\n","      <th>f4</th>\n","      <th>Nf6</th>\n","      <th>d3</th>\n","      <th>Nc6</th>\n","      <th>dxe4</th>\n","      <th>Qxd1+</th>\n","    </tr>\n","    <tr>\n","      <th>e6</th>\n","      <th>Nf3</th>\n","      <th>Nf6</th>\n","      <th>d3</th>\n","      <th>c5</th>\n","      <th>Be2</th>\n","      <th>Nc6</th>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"9\" valign=\"top\">d6</th>\n","      <th rowspan=\"2\" valign=\"top\">Nf3</th>\n","      <th>Bg4</th>\n","      <th>d4</th>\n","      <th>Bxf3</th>\n","      <th>exf3</th>\n","      <th>Nc6</th>\n","      <th>g3</th>\n","      <th>Nxd4</th>\n","    </tr>\n","    <tr>\n","      <th>c6</th>\n","      <th>e4</th>\n","      <th>g6</th>\n","      <th>d4</th>\n","      <th>f6</th>\n","      <th>Be3</th>\n","      <th>Nh6</th>\n","    </tr>\n","    <tr>\n","      <th>d3</th>\n","      <th>Nd7</th>\n","      <th>e4</th>\n","      <th>Ngf6</th>\n","      <th>Nf3</th>\n","      <th>e5</th>\n","      <th>Be2</th>\n","      <th>Be7</th>\n","    </tr>\n","    <tr>\n","      <th>d4</th>\n","      <th>Nd7</th>\n","      <th>e4</th>\n","      <th>Ngf6</th>\n","      <th>Be3</th>\n","      <th>e5</th>\n","      <th>dxe5</th>\n","      <th>dxe5</th>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"5\" valign=\"top\">e4</th>\n","      <th>Be7</th>\n","      <th>Nge2</th>\n","      <th>exd5</th>\n","      <th>cxd5</th>\n","      <th>O-O</th>\n","      <th>Ng3</th>\n","      <th>a6</th>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"2\" valign=\"top\">Nd7</th>\n","      <th rowspan=\"2\" valign=\"top\">d4</th>\n","      <th rowspan=\"2\" valign=\"top\">Ngf6</th>\n","      <th rowspan=\"2\" valign=\"top\">Be3</th>\n","      <th rowspan=\"2\" valign=\"top\">e5</th>\n","      <th rowspan=\"2\" valign=\"top\">f3</th>\n","      <th>Be7</th>\n","    </tr>\n","    <tr>\n","      <th>c6</th>\n","    </tr>\n","    <tr>\n","      <th>exd5</th>\n","      <th>cxd5</th>\n","      <th>Be7</th>\n","      <th>Nge2</th>\n","      <th>b5</th>\n","      <th>Nxb5</th>\n","      <th>Nxe4</th>\n","    </tr>\n","    <tr>\n","      <th>g6</th>\n","      <th>Bc4</th>\n","      <th>Bg7</th>\n","      <th>Nf3</th>\n","      <th>Nc6</th>\n","      <th>O-O</th>\n","      <th>Nf6</th>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"6\" valign=\"top\">e5</th>\n","      <th rowspan=\"6\" valign=\"top\">Nf3</th>\n","      <th rowspan=\"5\" valign=\"top\">Nc6</th>\n","      <th rowspan=\"3\" valign=\"top\">d4</th>\n","      <th rowspan=\"3\" valign=\"top\">exd4</th>\n","      <th rowspan=\"3\" valign=\"top\">Nxd4</th>\n","      <th rowspan=\"3\" valign=\"top\">Nf6</th>\n","      <th rowspan=\"2\" valign=\"top\">Bg5</th>\n","      <th>Bc5</th>\n","    </tr>\n","    <tr>\n","      <th>Be7</th>\n","    </tr>\n","    <tr>\n","      <th>g3</th>\n","      <th>Bc5</th>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"2\" valign=\"top\">e4</th>\n","      <th>Bb4</th>\n","      <th>d4</th>\n","      <th>Bxc3+</th>\n","      <th>bxc3</th>\n","      <th>exd4</th>\n","    </tr>\n","    <tr>\n","      <th>d6</th>\n","      <th>d4</th>\n","      <th>exd4</th>\n","      <th>Nxd4</th>\n","      <th>Nf6</th>\n","    </tr>\n","    <tr>\n","      <th>Nf6</th>\n","      <th>e4</th>\n","      <th>Nc6</th>\n","      <th>d4</th>\n","      <th>d6</th>\n","      <th>dxe5</th>\n","      <th>Nxe5</th>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"6\" valign=\"top\">e6</th>\n","      <th rowspan=\"4\" valign=\"top\">Nf3</th>\n","      <th>Be7</th>\n","      <th>e4</th>\n","      <th>Nf6</th>\n","      <th>d4</th>\n","      <th>d5</th>\n","      <th>e5</th>\n","      <th>Nfd7</th>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"2\" valign=\"top\">Nf6</th>\n","      <th rowspan=\"2\" valign=\"top\">e4</th>\n","      <th>Be7</th>\n","      <th>d4</th>\n","      <th>O-O</th>\n","      <th>e5</th>\n","      <th>Ne8</th>\n","    </tr>\n","    <tr>\n","      <th>d5</th>\n","      <th>exd5</th>\n","      <th>exd5</th>\n","      <th>d4</th>\n","      <th>Be7</th>\n","    </tr>\n","    <tr>\n","      <th>d5</th>\n","      <th>e4</th>\n","      <th>Be7</th>\n","      <th>exd5</th>\n","      <th>exd5</th>\n","      <th>d4</th>\n","      <th>Nf6</th>\n","    </tr>\n","    <tr>\n","      <th>d4</th>\n","      <th>g6</th>\n","      <th>e4</th>\n","      <th>Bg7</th>\n","      <th>h4</th>\n","      <th>h5</th>\n","      <th>Bg5</th>\n","      <th>f6</th>\n","    </tr>\n","    <tr>\n","      <th>e4</th>\n","      <th>Be7</th>\n","      <th>d4</th>\n","      <th>b5</th>\n","      <th>f4</th>\n","      <th>b4</th>\n","      <th>Nce2</th>\n","      <th>f5</th>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"6\" valign=\"top\">exd5</th>\n","      <th rowspan=\"6\" valign=\"top\">cxd5</th>\n","      <th rowspan=\"2\" valign=\"top\">d6</th>\n","      <th>f3</th>\n","      <th>a6</th>\n","      <th>a4</th>\n","      <th>b6</th>\n","      <th>e4</th>\n","      <th>g6</th>\n","    </tr>\n","    <tr>\n","      <th>g4</th>\n","      <th>Nxg4</th>\n","      <th>e4</th>\n","      <th>g6</th>\n","      <th>Bb5+</th>\n","      <th>Bd7</th>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"4\" valign=\"top\">g6</th>\n","      <th>Nf3</th>\n","      <th>Bg7</th>\n","      <th>e3</th>\n","      <th>O-O</th>\n","      <th>Be2</th>\n","      <th>d6</th>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"2\" valign=\"top\">e4</th>\n","      <th rowspan=\"2\" valign=\"top\">d6</th>\n","      <th rowspan=\"2\" valign=\"top\">Nf3</th>\n","      <th rowspan=\"2\" valign=\"top\">Bg7</th>\n","      <th>Bd3</th>\n","      <th>O-O</th>\n","    </tr>\n","    <tr>\n","      <th>h3</th>\n","      <th>O-O</th>\n","    </tr>\n","    <tr>\n","      <th>f3</th>\n","      <th>Bg7</th>\n","      <th>e4</th>\n","      <th>O-O</th>\n","      <th>Be3</th>\n","      <th>d6</th>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"4\" valign=\"top\">f5</th>\n","      <th rowspan=\"4\" valign=\"top\">Nf3</th>\n","      <th rowspan=\"2\" valign=\"top\">Nf6</th>\n","      <th rowspan=\"2\" valign=\"top\">e4</th>\n","      <th>e6</th>\n","      <th>e5</th>\n","      <th>Nd5</th>\n","      <th>d4</th>\n","      <th>Nxc3</th>\n","    </tr>\n","    <tr>\n","      <th>fxe4</th>\n","      <th>Ng5</th>\n","      <th>e6</th>\n","      <th>d3</th>\n","      <th>Be7</th>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"2\" valign=\"top\">d6</th>\n","      <th rowspan=\"2\" valign=\"top\">d4</th>\n","      <th>Nf6</th>\n","      <th>Bg5</th>\n","      <th>g6</th>\n","      <th>Bxf6</th>\n","      <th>exf6</th>\n","    </tr>\n","    <tr>\n","      <th>e5</th>\n","      <th>e4</th>\n","      <th>fxe4</th>\n","      <th>Nxe4</th>\n","      <th>exd4</th>\n","    </tr>\n","    <tr>\n","      <th>f6</th>\n","      <th>Nf3</th>\n","      <th>e6</th>\n","      <th>d4</th>\n","      <th>d6</th>\n","      <th>e4</th>\n","      <th>c6</th>\n","      <th>Bd3</th>\n","      <th>Qd7</th>\n","    </tr>\n","    <tr>\n","      <th>g6</th>\n","      <th>Nf3</th>\n","      <th>Bg7</th>\n","      <th>d4</th>\n","      <th>Nf6</th>\n","      <th>Bf4</th>\n","      <th>O-O</th>\n","      <th>e4</th>\n","      <th>d6</th>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["Empty DataFrame\n","Columns: []\n","Index: [(Nc3, d5, Nf3, d4, Ne4, c5, Ng3, e6, e4, Nf6), (Nc3, d5, Nf3, d4, Ne4, e5, Ng3, Nf6, e4, Nc6), (Nc3, d5, Nf3, d4, Ne4, h5, h4, e5, Neg5, f6), (Nc3, d5, Nf3, e6, d4, Nf6, Bg5, Be7, Bxf6, Bxf6), (Nc3, d5, d4, Nf6, Bf4, c5, e3, cxd4, exd4, a6), (Nc3, d5, d4, Nf6, Bf4, e6, a3, Bd6, Bg5, c5), (Nc3, d5, d4, c5, e4, e5, Nxd5, cxd4, Nf3, Nc6), (Nc3, d5, e3, Nc6, d4, Bf5, Bb5, e6, Nf3, Bd6), (Nc3, d5, e4, Nf6, e5, Nfd7, Nxd5, Nxe5, Ne3, c5), (Nc3, d5, e4, d4, Nce2, e5, Ng3, Be6, Nf3, Nd7), (Nc3, d5, e4, d4, Nce2, e5, Ng3, Nc6, Nf3, Nf6), (Nc3, d5, e4, d4, Nce2, e5, Ng3, h5, Nxh5, c5), (Nc3, d5, e4, d4, Nd5, e6, Nf4, g5, Nd3, Ke7), (Nc3, d5, e4, dxe4, Nxe4, Nf6, Nxf6+, exf6, Nf3, Bd6), (Nc3, d5, e4, dxe4, Nxe4, Nf6, Nxf6+, exf6, d4, Bd6), (Nc3, d5, e4, dxe4, f4, Nf6, d3, Nc6, dxe4, Qxd1+), (Nc3, d5, e4, e6, Nf3, Nf6, d3, c5, Be2, Nc6), (Nc3, d6, Nf3, Bg4, d4, Bxf3, exf3, Nc6, g3, Nxd4), (Nc3, d6, Nf3, c6, e4, g6, d4, f6, Be3, Nh6), (Nc3, d6, d3, Nd7, e4, Ngf6, Nf3, e5, Be2, Be7), (Nc3, d6, d4, Nd7, e4, Ngf6, Be3, e5, dxe5, dxe5), (Nc3, d6, e4, Be7, Nge2, exd5, cxd5, O-O, Ng3, a6), (Nc3, d6, e4, Nd7, d4, Ngf6, Be3, e5, f3, Be7), (Nc3, d6, e4, Nd7, d4, Ngf6, Be3, e5, f3, c6), (Nc3, d6, e4, exd5, cxd5, Be7, Nge2, b5, Nxb5, Nxe4), (Nc3, d6, e4, g6, Bc4, Bg7, Nf3, Nc6, O-O, Nf6), (Nc3, e5, Nf3, Nc6, d4, exd4, Nxd4, Nf6, Bg5, Bc5), (Nc3, e5, Nf3, Nc6, d4, exd4, Nxd4, Nf6, Bg5, Be7), (Nc3, e5, Nf3, Nc6, d4, exd4, Nxd4, Nf6, g3, Bc5), (Nc3, e5, Nf3, Nc6, e4, Bb4, d4, Bxc3+, bxc3, exd4), (Nc3, e5, Nf3, Nc6, e4, d6, d4, exd4, Nxd4, Nf6), (Nc3, e5, Nf3, Nf6, e4, Nc6, d4, d6, dxe5, Nxe5), (Nc3, e6, Nf3, Be7, e4, Nf6, d4, d5, e5, Nfd7), (Nc3, e6, Nf3, Nf6, e4, Be7, d4, O-O, e5, Ne8), (Nc3, e6, Nf3, Nf6, e4, d5, exd5, exd5, d4, Be7), (Nc3, e6, Nf3, d5, e4, Be7, exd5, exd5, d4, Nf6), (Nc3, e6, d4, g6, e4, Bg7, h4, h5, Bg5, f6), (Nc3, e6, e4, Be7, d4, b5, f4, b4, Nce2, f5), (Nc3, exd5, cxd5, d6, f3, a6, a4, b6, e4, g6), (Nc3, exd5, cxd5, d6, g4, Nxg4, e4, g6, Bb5+, Bd7), (Nc3, exd5, cxd5, g6, Nf3, Bg7, e3, O-O, Be2, d6), (Nc3, exd5, cxd5, g6, e4, d6, Nf3, Bg7, Bd3, O-O), (Nc3, exd5, cxd5, g6, e4, d6, Nf3, Bg7, h3, O-O), (Nc3, exd5, cxd5, g6, f3, Bg7, e4, O-O, Be3, d6), (Nc3, f5, Nf3, Nf6, e4, e6, e5, Nd5, d4, Nxc3), (Nc3, f5, Nf3, Nf6, e4, fxe4, Ng5, e6, d3, Be7), (Nc3, f5, Nf3, d6, d4, Nf6, Bg5, g6, Bxf6, exf6), (Nc3, f5, Nf3, d6, d4, e5, e4, fxe4, Nxe4, exd4), (Nc3, f6, Nf3, e6, d4, d6, e4, c6, Bd3, Qd7), (Nc3, g6, Nf3, Bg7, d4, Nf6, Bf4, O-O, e4, d6)]"]},"metadata":{"tags":[]},"execution_count":53}]},{"cell_type":"code","metadata":{"id":"UAomP2l246-G","colab_type":"code","colab":{}},"source":["#export dataset\n","final.to_csv('chess.csv')"],"execution_count":0,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"gwANCcFPCkcG","colab_type":"text"},"source":["##Groupby Frequency"]},{"cell_type":"code","metadata":{"id":"zFoRKxVTCoSs","colab_type":"code","outputId":"81aa97ae-613c-4b79-da12-8de1cc52e613","executionInfo":{"status":"ok","timestamp":1590969866971,"user_tz":-120,"elapsed":703,"user":{"displayName":"Michelangiolo Mazzeschi","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14Ghg8l8QeAQA6fd1iPVc2f_F0XQpum7zRjrF4R7HRw=s64","userId":"15738155355555420240"}},"colab":{"base_uri":"https://localhost:8080/","height":450}},"source":["final = tot.groupby([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], group_keys=True, squeeze=True, sort=True).size().sort_values(ascending=False)\n","final = pd.DataFrame(final)\n","final"],"execution_count":12,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th>0</th>\n","    </tr>\n","    <tr>\n","      <th>0</th>\n","      <th>1</th>\n","      <th>2</th>\n","      <th>3</th>\n","      <th>4</th>\n","      <th>5</th>\n","      <th>6</th>\n","      <th>7</th>\n","      <th>8</th>\n","      <th>9</th>\n","      <th></th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>e4</th>\n","      <th>c5</th>\n","      <th>Nf3</th>\n","      <th>d6</th>\n","      <th>d4</th>\n","      <th>cxd4</th>\n","      <th>Nxd4</th>\n","      <th>Nf6</th>\n","      <th>Nc3</th>\n","      <th>a6</th>\n","      <td>127</td>\n","    </tr>\n","    <tr>\n","      <th>d4</th>\n","      <th>Nf6</th>\n","      <th>c4</th>\n","      <th>g6</th>\n","      <th>Nc3</th>\n","      <th>d5</th>\n","      <th>cxd5</th>\n","      <th>Nxd5</th>\n","      <th>e4</th>\n","      <th>Nxc3</th>\n","      <td>41</td>\n","    </tr>\n","    <tr>\n","      <th>e4</th>\n","      <th>e5</th>\n","      <th>Nf3</th>\n","      <th>Nc6</th>\n","      <th>Bb5</th>\n","      <th>a6</th>\n","      <th>Ba4</th>\n","      <th>Nf6</th>\n","      <th>O-O</th>\n","      <th>Be7</th>\n","      <td>30</td>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"2\" valign=\"top\">Nf3</th>\n","      <th rowspan=\"2\" valign=\"top\">Nf6</th>\n","      <th rowspan=\"2\" valign=\"top\">g3</th>\n","      <th rowspan=\"2\" valign=\"top\">g6</th>\n","      <th rowspan=\"2\" valign=\"top\">Bg2</th>\n","      <th rowspan=\"2\" valign=\"top\">Bg7</th>\n","      <th rowspan=\"2\" valign=\"top\">O-O</th>\n","      <th rowspan=\"2\" valign=\"top\">O-O</th>\n","      <th rowspan=\"2\" valign=\"top\">d4</th>\n","      <th>d5</th>\n","      <td>28</td>\n","    </tr>\n","    <tr>\n","      <th>d6</th>\n","      <td>25</td>\n","    </tr>\n","    <tr>\n","      <th>...</th>\n","      <th>...</th>\n","      <th>...</th>\n","      <th>...</th>\n","      <th>...</th>\n","      <th>...</th>\n","      <th>...</th>\n","      <th>...</th>\n","      <th>...</th>\n","      <th>...</th>\n","      <td>...</td>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"4\" valign=\"top\">e4</th>\n","      <th rowspan=\"4\" valign=\"top\">Nc6</th>\n","      <th rowspan=\"4\" valign=\"top\">Nf3</th>\n","      <th rowspan=\"4\" valign=\"top\">e5</th>\n","      <th>Bb5</th>\n","      <th>a6</th>\n","      <th>Ba4</th>\n","      <th>Nf6</th>\n","      <th>O-O</th>\n","      <th>Be7</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"2\" valign=\"top\">Bc4</th>\n","      <th>Bc5</th>\n","      <th>O-O</th>\n","      <th>Nf6</th>\n","      <th>d3</th>\n","      <th>d6</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th>Nf6</th>\n","      <th>d3</th>\n","      <th>Bc5</th>\n","      <th>O-O</th>\n","      <th>d6</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th>d4</th>\n","      <th>exd4</th>\n","      <th>Nxd4</th>\n","      <th>Nf6</th>\n","      <th>Nxc6</th>\n","      <th>dxc6</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th>Bg5</th>\n","      <th>exd5</th>\n","      <th>cxd5</th>\n","      <th>d6</th>\n","      <th>Nc3</th>\n","      <th>Nbd7</th>\n","      <th>Nf3</th>\n","      <th>g6</th>\n","      <th>Bh4</th>\n","      <th>Bg7</th>\n","      <td>1</td>\n","    </tr>\n","  </tbody>\n","</table>\n","<p>5558 rows × 1 columns</p>\n","</div>"],"text/plain":["                                                  0\n","0   1    2    3   4   5    6    7    8    9        \n","e4  c5   Nf3  d6  d4  cxd4 Nxd4 Nf6  Nc3  a6    127\n","d4  Nf6  c4   g6  Nc3 d5   cxd5 Nxd5 e4   Nxc3   41\n","e4  e5   Nf3  Nc6 Bb5 a6   Ba4  Nf6  O-O  Be7    30\n","Nf3 Nf6  g3   g6  Bg2 Bg7  O-O  O-O  d4   d5     28\n","                                          d6     25\n","...                                             ...\n","e4  Nc6  Nf3  e5  Bb5 a6   Ba4  Nf6  O-O  Be7     1\n","                  Bc4 Bc5  O-O  Nf6  d3   d6      1\n","                      Nf6  d3   Bc5  O-O  d6      1\n","                  d4  exd4 Nxd4 Nf6  Nxc6 dxc6    1\n","Bg5 exd5 cxd5 d6  Nc3 Nbd7 Nf3  g6   Bh4  Bg7     1\n","\n","[5558 rows x 1 columns]"]},"metadata":{"tags":[]},"execution_count":12}]},{"cell_type":"code","metadata":{"id":"RhIP5_Ok2Yvv","colab_type":"code","colab":{}},"source":["#in order to reset it, we need to export it\n","final.to_csv('chess.csv')"],"execution_count":0,"outputs":[]},{"cell_type":"code","metadata":{"id":"YIH7jKeJ2vRF","colab_type":"code","outputId":"ea6f24da-5c96-460b-98d5-0fa9718397b7","executionInfo":{"status":"ok","timestamp":1590969896300,"user_tz":-120,"elapsed":633,"user":{"displayName":"Michelangiolo Mazzeschi","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14Ghg8l8QeAQA6fd1iPVc2f_F0XQpum7zRjrF4R7HRw=s64","userId":"15738155355555420240"}},"colab":{"base_uri":"https://localhost:8080/","height":669}},"source":["#import of already reset dataset\n","final_ = pd.read_csv('/content/chess.csv')\n","final_.columns = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'frequency']\n","final_ = final_[0:20]\n","final_"],"execution_count":18,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>0</th>\n","      <th>1</th>\n","      <th>2</th>\n","      <th>3</th>\n","      <th>4</th>\n","      <th>5</th>\n","      <th>6</th>\n","      <th>7</th>\n","      <th>8</th>\n","      <th>9</th>\n","      <th>frequency</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>e4</td>\n","      <td>c5</td>\n","      <td>Nf3</td>\n","      <td>d6</td>\n","      <td>d4</td>\n","      <td>cxd4</td>\n","      <td>Nxd4</td>\n","      <td>Nf6</td>\n","      <td>Nc3</td>\n","      <td>a6</td>\n","      <td>127</td>\n","    </tr>\n","    <tr>\n","      <th>1</th>\n","      <td>d4</td>\n","      <td>Nf6</td>\n","      <td>c4</td>\n","      <td>g6</td>\n","      <td>Nc3</td>\n","      <td>d5</td>\n","      <td>cxd5</td>\n","      <td>Nxd5</td>\n","      <td>e4</td>\n","      <td>Nxc3</td>\n","      <td>41</td>\n","    </tr>\n","    <tr>\n","      <th>2</th>\n","      <td>e4</td>\n","      <td>e5</td>\n","      <td>Nf3</td>\n","      <td>Nc6</td>\n","      <td>Bb5</td>\n","      <td>a6</td>\n","      <td>Ba4</td>\n","      <td>Nf6</td>\n","      <td>O-O</td>\n","      <td>Be7</td>\n","      <td>30</td>\n","    </tr>\n","    <tr>\n","      <th>3</th>\n","      <td>Nf3</td>\n","      <td>Nf6</td>\n","      <td>g3</td>\n","      <td>g6</td>\n","      <td>Bg2</td>\n","      <td>Bg7</td>\n","      <td>O-O</td>\n","      <td>O-O</td>\n","      <td>d4</td>\n","      <td>d5</td>\n","      <td>28</td>\n","    </tr>\n","    <tr>\n","      <th>4</th>\n","      <td>Nf3</td>\n","      <td>Nf6</td>\n","      <td>g3</td>\n","      <td>g6</td>\n","      <td>Bg2</td>\n","      <td>Bg7</td>\n","      <td>O-O</td>\n","      <td>O-O</td>\n","      <td>d4</td>\n","      <td>d6</td>\n","      <td>25</td>\n","    </tr>\n","    <tr>\n","      <th>5</th>\n","      <td>e4</td>\n","      <td>e6</td>\n","      <td>d4</td>\n","      <td>d5</td>\n","      <td>Nc3</td>\n","      <td>Nf6</td>\n","      <td>e5</td>\n","      <td>Nfd7</td>\n","      <td>f4</td>\n","      <td>c5</td>\n","      <td>24</td>\n","    </tr>\n","    <tr>\n","      <th>6</th>\n","      <td>e4</td>\n","      <td>e5</td>\n","      <td>Nf3</td>\n","      <td>Nc6</td>\n","      <td>d4</td>\n","      <td>exd4</td>\n","      <td>Nxd4</td>\n","      <td>Nf6</td>\n","      <td>Nxc6</td>\n","      <td>bxc6</td>\n","      <td>21</td>\n","    </tr>\n","    <tr>\n","      <th>7</th>\n","      <td>d4</td>\n","      <td>Nf6</td>\n","      <td>c4</td>\n","      <td>c5</td>\n","      <td>d5</td>\n","      <td>e6</td>\n","      <td>Nc3</td>\n","      <td>exd5</td>\n","      <td>cxd5</td>\n","      <td>d6</td>\n","      <td>19</td>\n","    </tr>\n","    <tr>\n","      <th>8</th>\n","      <td>e4</td>\n","      <td>c5</td>\n","      <td>Nf3</td>\n","      <td>d6</td>\n","      <td>d4</td>\n","      <td>cxd4</td>\n","      <td>Nxd4</td>\n","      <td>Nf6</td>\n","      <td>Nc3</td>\n","      <td>Nc6</td>\n","      <td>18</td>\n","    </tr>\n","    <tr>\n","      <th>9</th>\n","      <td>e4</td>\n","      <td>c5</td>\n","      <td>Nf3</td>\n","      <td>e6</td>\n","      <td>d4</td>\n","      <td>cxd4</td>\n","      <td>Nxd4</td>\n","      <td>Nc6</td>\n","      <td>Nc3</td>\n","      <td>Qc7</td>\n","      <td>16</td>\n","    </tr>\n","    <tr>\n","      <th>10</th>\n","      <td>e4</td>\n","      <td>c6</td>\n","      <td>d4</td>\n","      <td>d5</td>\n","      <td>Nc3</td>\n","      <td>dxe4</td>\n","      <td>Nxe4</td>\n","      <td>Nf6</td>\n","      <td>Nxf6+</td>\n","      <td>exf6</td>\n","      <td>16</td>\n","    </tr>\n","    <tr>\n","      <th>11</th>\n","      <td>e4</td>\n","      <td>Nf6</td>\n","      <td>e5</td>\n","      <td>Nd5</td>\n","      <td>d4</td>\n","      <td>d6</td>\n","      <td>Nf3</td>\n","      <td>dxe5</td>\n","      <td>Nxe5</td>\n","      <td>c6</td>\n","      <td>15</td>\n","    </tr>\n","    <tr>\n","      <th>12</th>\n","      <td>e4</td>\n","      <td>e6</td>\n","      <td>d4</td>\n","      <td>d5</td>\n","      <td>Nc3</td>\n","      <td>dxe4</td>\n","      <td>Nxe4</td>\n","      <td>Nd7</td>\n","      <td>Nf3</td>\n","      <td>Ngf6</td>\n","      <td>14</td>\n","    </tr>\n","    <tr>\n","      <th>13</th>\n","      <td>e4</td>\n","      <td>Nf6</td>\n","      <td>e5</td>\n","      <td>Nd5</td>\n","      <td>d4</td>\n","      <td>d6</td>\n","      <td>Nf3</td>\n","      <td>Bg4</td>\n","      <td>Be2</td>\n","      <td>e6</td>\n","      <td>13</td>\n","    </tr>\n","    <tr>\n","      <th>14</th>\n","      <td>d4</td>\n","      <td>Nf6</td>\n","      <td>c4</td>\n","      <td>g6</td>\n","      <td>Nc3</td>\n","      <td>Bg7</td>\n","      <td>e4</td>\n","      <td>d6</td>\n","      <td>Nf3</td>\n","      <td>O-O</td>\n","      <td>13</td>\n","    </tr>\n","    <tr>\n","      <th>15</th>\n","      <td>d4</td>\n","      <td>Nf6</td>\n","      <td>Nf3</td>\n","      <td>g6</td>\n","      <td>c4</td>\n","      <td>Bg7</td>\n","      <td>Nc3</td>\n","      <td>O-O</td>\n","      <td>e4</td>\n","      <td>d6</td>\n","      <td>13</td>\n","    </tr>\n","    <tr>\n","      <th>16</th>\n","      <td>e4</td>\n","      <td>e5</td>\n","      <td>Nf3</td>\n","      <td>Nc6</td>\n","      <td>Bb5</td>\n","      <td>Nf6</td>\n","      <td>O-O</td>\n","      <td>Nxe4</td>\n","      <td>Re1</td>\n","      <td>Nd6</td>\n","      <td>12</td>\n","    </tr>\n","    <tr>\n","      <th>17</th>\n","      <td>e4</td>\n","      <td>e5</td>\n","      <td>Nf3</td>\n","      <td>Nc6</td>\n","      <td>d4</td>\n","      <td>exd4</td>\n","      <td>Nxd4</td>\n","      <td>Bc5</td>\n","      <td>Nb3</td>\n","      <td>Bb6</td>\n","      <td>12</td>\n","    </tr>\n","    <tr>\n","      <th>18</th>\n","      <td>e4</td>\n","      <td>e5</td>\n","      <td>Nf3</td>\n","      <td>Nc6</td>\n","      <td>Bb5</td>\n","      <td>a6</td>\n","      <td>Ba4</td>\n","      <td>Nf6</td>\n","      <td>O-O</td>\n","      <td>b5</td>\n","      <td>12</td>\n","    </tr>\n","    <tr>\n","      <th>19</th>\n","      <td>e4</td>\n","      <td>c6</td>\n","      <td>d4</td>\n","      <td>d5</td>\n","      <td>e5</td>\n","      <td>Bf5</td>\n","      <td>Nf3</td>\n","      <td>e6</td>\n","      <td>Be2</td>\n","      <td>Ne7</td>\n","      <td>12</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["      0    1    2    3    4     5     6     7      8     9  frequency\n","0    e4   c5  Nf3   d6   d4  cxd4  Nxd4   Nf6    Nc3    a6        127\n","1    d4  Nf6   c4   g6  Nc3    d5  cxd5  Nxd5     e4  Nxc3         41\n","2    e4   e5  Nf3  Nc6  Bb5    a6   Ba4   Nf6    O-O   Be7         30\n","3   Nf3  Nf6   g3   g6  Bg2   Bg7   O-O   O-O     d4    d5         28\n","4   Nf3  Nf6   g3   g6  Bg2   Bg7   O-O   O-O     d4    d6         25\n","5    e4   e6   d4   d5  Nc3   Nf6    e5  Nfd7     f4    c5         24\n","6    e4   e5  Nf3  Nc6   d4  exd4  Nxd4   Nf6   Nxc6  bxc6         21\n","7    d4  Nf6   c4   c5   d5    e6   Nc3  exd5   cxd5    d6         19\n","8    e4   c5  Nf3   d6   d4  cxd4  Nxd4   Nf6    Nc3   Nc6         18\n","9    e4   c5  Nf3   e6   d4  cxd4  Nxd4   Nc6    Nc3   Qc7         16\n","10   e4   c6   d4   d5  Nc3  dxe4  Nxe4   Nf6  Nxf6+  exf6         16\n","11   e4  Nf6   e5  Nd5   d4    d6   Nf3  dxe5   Nxe5    c6         15\n","12   e4   e6   d4   d5  Nc3  dxe4  Nxe4   Nd7    Nf3  Ngf6         14\n","13   e4  Nf6   e5  Nd5   d4    d6   Nf3   Bg4    Be2    e6         13\n","14   d4  Nf6   c4   g6  Nc3   Bg7    e4    d6    Nf3   O-O         13\n","15   d4  Nf6  Nf3   g6   c4   Bg7   Nc3   O-O     e4    d6         13\n","16   e4   e5  Nf3  Nc6  Bb5   Nf6   O-O  Nxe4    Re1   Nd6         12\n","17   e4   e5  Nf3  Nc6   d4  exd4  Nxd4   Bc5    Nb3   Bb6         12\n","18   e4   e5  Nf3  Nc6  Bb5    a6   Ba4   Nf6    O-O    b5         12\n","19   e4   c6   d4   d5   e5   Bf5   Nf3    e6    Be2   Ne7         12"]},"metadata":{"tags":[]},"execution_count":18}]},{"cell_type":"code","metadata":{"id":"mHKRhxFR22Sd","colab_type":"code","outputId":"8c20003b-59d2-4cc8-d644-8a8185f6dd98","executionInfo":{"status":"ok","timestamp":1590969935727,"user_tz":-120,"elapsed":680,"user":{"displayName":"Michelangiolo Mazzeschi","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14Ghg8l8QeAQA6fd1iPVc2f_F0XQpum7zRjrF4R7HRw=s64","userId":"15738155355555420240"}},"colab":{"base_uri":"https://localhost:8080/","height":700}},"source":["final_ = final_.groupby([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], group_keys=True, squeeze=True, sort=True).count()\n","final_[0:20]"],"execution_count":20,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th>frequency</th>\n","    </tr>\n","    <tr>\n","      <th>0</th>\n","      <th>1</th>\n","      <th>2</th>\n","      <th>3</th>\n","      <th>4</th>\n","      <th>5</th>\n","      <th>6</th>\n","      <th>7</th>\n","      <th>8</th>\n","      <th>9</th>\n","      <th></th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th rowspan=\"2\" valign=\"top\">Nf3</th>\n","      <th rowspan=\"2\" valign=\"top\">Nf6</th>\n","      <th rowspan=\"2\" valign=\"top\">g3</th>\n","      <th rowspan=\"2\" valign=\"top\">g6</th>\n","      <th rowspan=\"2\" valign=\"top\">Bg2</th>\n","      <th rowspan=\"2\" valign=\"top\">Bg7</th>\n","      <th rowspan=\"2\" valign=\"top\">O-O</th>\n","      <th rowspan=\"2\" valign=\"top\">O-O</th>\n","      <th rowspan=\"2\" valign=\"top\">d4</th>\n","      <th>d5</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th>d6</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"4\" valign=\"top\">d4</th>\n","      <th rowspan=\"4\" valign=\"top\">Nf6</th>\n","      <th>Nf3</th>\n","      <th>g6</th>\n","      <th>c4</th>\n","      <th>Bg7</th>\n","      <th>Nc3</th>\n","      <th>O-O</th>\n","      <th>e4</th>\n","      <th>d6</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"3\" valign=\"top\">c4</th>\n","      <th>c5</th>\n","      <th>d5</th>\n","      <th>e6</th>\n","      <th>Nc3</th>\n","      <th>exd5</th>\n","      <th>cxd5</th>\n","      <th>d6</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"2\" valign=\"top\">g6</th>\n","      <th rowspan=\"2\" valign=\"top\">Nc3</th>\n","      <th>Bg7</th>\n","      <th>e4</th>\n","      <th>d6</th>\n","      <th>Nf3</th>\n","      <th>O-O</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th>d5</th>\n","      <th>cxd5</th>\n","      <th>Nxd5</th>\n","      <th>e4</th>\n","      <th>Nxc3</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"14\" valign=\"top\">e4</th>\n","      <th rowspan=\"2\" valign=\"top\">Nf6</th>\n","      <th rowspan=\"2\" valign=\"top\">e5</th>\n","      <th rowspan=\"2\" valign=\"top\">Nd5</th>\n","      <th rowspan=\"2\" valign=\"top\">d4</th>\n","      <th rowspan=\"2\" valign=\"top\">d6</th>\n","      <th rowspan=\"2\" valign=\"top\">Nf3</th>\n","      <th>Bg4</th>\n","      <th>Be2</th>\n","      <th>e6</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th>dxe5</th>\n","      <th>Nxe5</th>\n","      <th>c6</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"3\" valign=\"top\">c5</th>\n","      <th rowspan=\"3\" valign=\"top\">Nf3</th>\n","      <th rowspan=\"2\" valign=\"top\">d6</th>\n","      <th rowspan=\"2\" valign=\"top\">d4</th>\n","      <th rowspan=\"2\" valign=\"top\">cxd4</th>\n","      <th rowspan=\"2\" valign=\"top\">Nxd4</th>\n","      <th rowspan=\"2\" valign=\"top\">Nf6</th>\n","      <th rowspan=\"2\" valign=\"top\">Nc3</th>\n","      <th>Nc6</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th>a6</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th>e6</th>\n","      <th>d4</th>\n","      <th>cxd4</th>\n","      <th>Nxd4</th>\n","      <th>Nc6</th>\n","      <th>Nc3</th>\n","      <th>Qc7</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"2\" valign=\"top\">c6</th>\n","      <th rowspan=\"2\" valign=\"top\">d4</th>\n","      <th rowspan=\"2\" valign=\"top\">d5</th>\n","      <th>Nc3</th>\n","      <th>dxe4</th>\n","      <th>Nxe4</th>\n","      <th>Nf6</th>\n","      <th>Nxf6+</th>\n","      <th>exf6</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th>e5</th>\n","      <th>Bf5</th>\n","      <th>Nf3</th>\n","      <th>e6</th>\n","      <th>Be2</th>\n","      <th>Ne7</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"5\" valign=\"top\">e5</th>\n","      <th rowspan=\"5\" valign=\"top\">Nf3</th>\n","      <th rowspan=\"5\" valign=\"top\">Nc6</th>\n","      <th rowspan=\"3\" valign=\"top\">Bb5</th>\n","      <th>Nf6</th>\n","      <th>O-O</th>\n","      <th>Nxe4</th>\n","      <th>Re1</th>\n","      <th>Nd6</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"2\" valign=\"top\">a6</th>\n","      <th rowspan=\"2\" valign=\"top\">Ba4</th>\n","      <th rowspan=\"2\" valign=\"top\">Nf6</th>\n","      <th rowspan=\"2\" valign=\"top\">O-O</th>\n","      <th>Be7</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th>b5</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"2\" valign=\"top\">d4</th>\n","      <th rowspan=\"2\" valign=\"top\">exd4</th>\n","      <th rowspan=\"2\" valign=\"top\">Nxd4</th>\n","      <th>Bc5</th>\n","      <th>Nb3</th>\n","      <th>Bb6</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th>Nf6</th>\n","      <th>Nxc6</th>\n","      <th>bxc6</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"2\" valign=\"top\">e6</th>\n","      <th rowspan=\"2\" valign=\"top\">d4</th>\n","      <th rowspan=\"2\" valign=\"top\">d5</th>\n","      <th rowspan=\"2\" valign=\"top\">Nc3</th>\n","      <th>Nf6</th>\n","      <th>e5</th>\n","      <th>Nfd7</th>\n","      <th>f4</th>\n","      <th>c5</th>\n","      <td>1</td>\n","    </tr>\n","    <tr>\n","      <th>dxe4</th>\n","      <th>Nxe4</th>\n","      <th>Nd7</th>\n","      <th>Nf3</th>\n","      <th>Ngf6</th>\n","      <td>1</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                               frequency\n","0   1   2   3   4   5    6    7    8     9              \n","Nf3 Nf6 g3  g6  Bg2 Bg7  O-O  O-O  d4    d5            1\n","                                         d6            1\n","d4  Nf6 Nf3 g6  c4  Bg7  Nc3  O-O  e4    d6            1\n","        c4  c5  d5  e6   Nc3  exd5 cxd5  d6            1\n","            g6  Nc3 Bg7  e4   d6   Nf3   O-O           1\n","                    d5   cxd5 Nxd5 e4    Nxc3          1\n","e4  Nf6 e5  Nd5 d4  d6   Nf3  Bg4  Be2   e6            1\n","                              dxe5 Nxe5  c6            1\n","    c5  Nf3 d6  d4  cxd4 Nxd4 Nf6  Nc3   Nc6           1\n","                                         a6            1\n","            e6  d4  cxd4 Nxd4 Nc6  Nc3   Qc7           1\n","    c6  d4  d5  Nc3 dxe4 Nxe4 Nf6  Nxf6+ exf6          1\n","                e5  Bf5  Nf3  e6   Be2   Ne7           1\n","    e5  Nf3 Nc6 Bb5 Nf6  O-O  Nxe4 Re1   Nd6           1\n","                    a6   Ba4  Nf6  O-O   Be7           1\n","                                         b5            1\n","                d4  exd4 Nxd4 Bc5  Nb3   Bb6           1\n","                              Nf6  Nxc6  bxc6          1\n","    e6  d4  d5  Nc3 Nf6  e5   Nfd7 f4    c5            1\n","                    dxe4 Nxe4 Nd7  Nf3   Ngf6          1"]},"metadata":{"tags":[]},"execution_count":20}]}]}